import { request } from './request'

export function getTopList() {
  return request({
    url: '/toplist'
  })
}

export function  getPlayList(id) {
  return request({
    url: '/playlist/detail',
    params: { 
      id
    }
  })
}
export function  getSongDetail(ids) {
  return request({
    url: '/song/detail/',
    params: {
      ids,
    }
  })
}

export class setSongList {
  constructor(data) {
    this.id = data.id,
    this.name = data.name,
    this.imgUrl = data.al.picUrl,
    this.alName = data.al.name
    this.artistName = data.ar
    this.duration = data.dt
  }  
}